<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/index.css">
</head>

<body>
    <p>
        <!-- <a href="./demo.html">跳转文件</a> -->
        <a href="/demo">跳转文件</a>
    </p>

    <br>
    <br>
    <br>

    <h2>
        <!-- 固定的语法  传入过来的字段，可以直接使用 -->
        商品信息
    </h2>



    <ul>
        <li>
            <span>商品品牌：</span>
            <em>
                <%= goods.brands %>
            </em>
        </li>
        <li>
            <span>商品名称：</span>
            <em>
                <%= goods.goods_name %>
            </em>
        </li>
        <li>
            <span>商品价格：</span>
            <em>
                <%= goods.goods_price %>
            </em>
        </li>
        <li>
            <span>商品数量：</span>
            <em>
                <%= goods.goods_num %>
            </em>
        </li>

        <!-- 判断的语法 -->
        <li>
            <span>商品优惠：</span>
            <em>
                <%= goods.youhui ? goods.youhui : '暂无优惠' %>
            </em>
        </li>


        <% if(goods.gifts) { %>
            <li>
                <span>赠送礼品：</span>
                <em>
                    <%= goods.gifts %>
                </em>
            </li>
            <% } %>
    </ul>
</body>

</html>